package com.isunland.managesystem.ui;

import android.support.v4.app.Fragment;
import com.isunland.managesystem.R;
import com.isunland.managesystem.base.BasePagerActivity;
import com.isunland.managesystem.entity.CustomerMainOriginal;
import com.isunland.managesystem.ui.SignFieldFragment.Callbacks;

public class SignFieldActivity extends BasePagerActivity implements Callbacks {
  private int[] titles = { R.string.sign_field, R.string.sign_field_list };

  SignFielListFragment fragment;

  @Override protected Fragment createFragmentOne() {
    CustomerMainOriginal.rCustomerMain mCustomerDetail =
        (CustomerMainOriginal.rCustomerMain) getIntent().getSerializableExtra(
            CustomerVisitFragment.EXTRA_VALUE);
    return SignFieldFragment.newInstance(mCustomerDetail);
  }

  @Override protected Fragment createFragmentTwo() {
    fragment = new SignFielListFragment();
    return fragment;
  }

  @Override protected int[] createTitle() {

    return titles;
  }

  @Override public void onRefresh() {
    setNavigateTo(1);
    fragment.refresh();
  }
}
